/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jm.financeiro.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 *
 * @author joao
 */
public class CamposRelatorio implements Serializable {

    private Integer id;
    private String label;
    private String campo;

    public CamposRelatorio(Integer id, String campo, String label) {
        this.id = id;
        this.campo = campo;
        this.label = label;
    }

    public CamposRelatorio() {

    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getCampo() {
        return campo;
    }

    public void setCampo(String campo) {
        this.campo = campo;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof CamposRelatorio)) {
            return false;
        }

        return Objects.equals(((CamposRelatorio) obj).getId(), this.id);
    }

    @Override
    public int hashCode() {
        int hash = 1;
        return hash * 31 + campo.hashCode();
    }

    @Override
    public String toString() {
        return campo;
    }
}
